﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace CreditAgricole.Application
{
    public class VOBase
    {
        public string Title;

        public string Name;

        public DateTime Created;

        public string Author;

        public string WebUrl;

        public string ListUrl;

        public string DocUrl;

        public bool NeedsApproval = false;

        protected Dictionary<string, string> properties;

        protected Dictionary<string, object> details;

        public Dictionary<string, string> PropertiesToDisplay
        {
            get 
            { 
                SetBaseInformation();  
                return properties; 
            }
        }

        public Dictionary<string, object> DetailsToDisplay
        {
            get
            {
                SetDetailedInformation();
                return details;
            }
        }

        protected virtual void SetDetailedInformation()
        {
            details = new Dictionary<string, object>();
        }

        protected virtual void SetBaseInformation()
        {
            properties = new Dictionary<string,string>();
            properties.Add("Titre", Title);
            properties.Add("Nom", Name);
            properties.Add("Date de création", Created.ToString("dd/MM/yyyy"));
            properties.Add("Auteur", Author);
        }
    }
}
